<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main" />
    <title>Song List</title>
  </head>
  <body>
    <h1>Song list</h1>

    <table>
      <tr>
        <th>Artist</th>
        <th>Song</th>
      </tr>

      <g:each in="${list}" status="i" var="song">
        <tr class="${(i % 2) == 0 ? 'dataTableRow1' : 'dataTableRow2'}">
          <td><g:link controller="artist" action="show" id="${song.artist.id}">${song.artist.name}</g:link></td>
          <td><g:link controller="song" action="show" params="[artistId:song.artist.id, id:song.id]">${song.title}</g:link></td>
        </tr>
      </g:each>
    </table>
  </body>
</html>
